id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

Collection TransformationsChain1

fun chain1(s: String): String = s.asSequence() .map { it.uppercase() } .filter { it in ("A".."F") } .map { it.lowercase() } .joinToString(", ") fun main() { println(chain1("BIKE")) println(chain1("Elephant")) println(chain1("garage")) println(chain1("DECK")) println(chain1("House")) }

Click on to run the code

⬅ Back